const http=require('http').createServer()
const socketio=require('socket.io')(http,{
	cors:{
		origin:'*'
	}
})
socketio.on('connection',socket=> {
	socket.emit('kefu',{username:'官方客服',avatar:'img/girl.png',info:'你好，请问有什么可以帮你'})
	socket.on('kefu',info=>{
		// 在发给客户端
		socket.emit('kefu',info)
	})
})
http.listen(6002,()=>console.log('Sufubi Kefu Server Listening 6002....'))